﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MegaMan3PasswordGen
{
    public partial class mm3pgForm : Form
    {
        public mm3pgForm()
        {
            InitializeComponent();
        }

        private void mm3pgForm_Load(object sender, EventArgs e)
        {
            etComboBox.Items.Add("0");
            etComboBox.Items.Add("1");
            etComboBox.Items.Add("2");
            etComboBox.Items.Add("3");
            etComboBox.Items.Add("4");
            etComboBox.Items.Add("5");
            etComboBox.Items.Add("6");
            etComboBox.Items.Add("7");
            etComboBox.Items.Add("8");
            etComboBox.Items.Add("9");

            etComboBox.SelectedIndex = 0;

        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AboutBox1 ab = new AboutBox1();

            ab.ShowDialog();
        }

        private void etComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void genButton_Click(object sender, EventArgs e)
        {
            //clear old data
            clearToolStripMenuItem_Click(sender, e);

            //energy tanks
            if (etComboBox.SelectedIndex == 0)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 1)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 2)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 3)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 4)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 5)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 6)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 7)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 8)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //9
            }
            if (etComboBox.SelectedIndex == 9)
            {
                c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //0
                e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //1
                e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //2
                b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //3
                a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //4
                c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //5
                d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //6
                c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //7
                f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel; //8
                a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot; //9
            }

            if (topmanCheckBox.Checked)
            {
                a3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (snakemanCheckBox.Checked)
            {
                f6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (topmanCheckBox.Checked && snakemanCheckBox.Checked)
            {
                f6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                a3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            }

            if (magnetmanCheckBox.Checked)
            {
                f5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (needlemanCheckBox.Checked)
            {
                d3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (magnetmanCheckBox.Checked && needlemanCheckBox.Checked)
            {
                f5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                d3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            }

            if (hardmanCheckBox.Checked)
            {
                c4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (geminimanCheckBox.Checked)
            {
                b5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (hardmanCheckBox.Checked && geminimanCheckBox.Checked)
            {
                c4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                b5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            }

            if (sparkmanCheckBox.Checked)
            {
                f4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (shadowmanCheckBox.Checked)
            {
                d6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (sparkmanCheckBox.Checked && shadowmanCheckBox.Checked)
            {
                d6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                f4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            }

            //beyond the first 8 stages
            if (needledocCheckBox.Checked)
            {
                BeyondEight();
                b2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (geminidocCheckBox.Checked)
            {
                BeyondEight();
                b6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (needledocCheckBox.Checked && geminidocCheckBox.Checked)
            {
                BeyondEight();
                b6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                b2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            }

            if (sparkdocCheckBox.Checked)
            {
                BeyondEight();
                a1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (shadowdocCheckBox.Checked)
            {
                BeyondEight();
                a4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
            if (sparkdocCheckBox.Checked && shadowdocCheckBox.Checked)
            {
                BeyondEight();
                a4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                a1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            }

            if (breakmanCheckBox.Checked)
            {
                BeyondEight();
                b6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                b2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
                a4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
                a1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
                e1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.reddot;
            }
        }

        private void clearToolStripMenuItem_Click(object sender, EventArgs e)
        {
            a1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            a2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            a3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            a4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            a5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            a6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;

            b1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            b2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            b3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            b4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            b5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            b6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;

            c1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            c2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            c3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            c4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            c5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            c6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;

            d1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            d2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            d3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            d4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            d5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            d6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;

            e1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            e2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            e3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            e4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            e5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            e6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;

            f1PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            f2PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            f3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            f4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            f5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            f6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
        }


        private void BeyondEight()
        {
            //if we choose bosses after the first 8, then the first 8 must be removed
            f6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            a3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            f5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            d3PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            c4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            b5PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
            d6PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.emptycel;
            f4PictureBox.Image = MegaMan3PasswordGen.Properties.Resources.bluedot;
        }



    }
}
